home *** CD-ROM | disk | FTP | other *** search
- /*
- File: GXWindow.h
-
- Contains: The prototype GX window
-
- Written by: Jon Summers
-
- Copyright: © 1994 by Jon Summers, all rights reserved.
-
- Change History (most recent first):
-
- */
-
- #ifndef _GXDocWindow_
- #define _GXDocWindow_
-
- #ifndef _DOCWINDOW_
- #include "DocWindow.h"
- #endif
-
- #ifndef __QDGXHeaders__
- #include "QDGXHeaders.h"
- #endif
-
- #define kMaxPageFormats 20
-
- class TGXDocWindow : public TDocWindow
- {
- public:
- TGXDocWindow();
- virtual ~TGXDocWindow();
-
- virtual void Draw(void);
- virtual void Select(void);
- virtual void Activate(Boolean activating);
- virtual void AdjustCursor(EventRecord* pEvent);
- virtual void SetupMenus(void);
- virtual void Click(EventRecord *pEvent);
- virtual void AdjustForNewWindowSize(Rect* pOldRect,Rect* pNewRect);
- virtual void HandleMenuCommand(short theMenuID, short theMenuItem);
-
- void CreateSampleImage(void);
- OSErr ReadPage(long thePageNum);
- void GetContentRect(Rect* pRect);
-
- #if qUseQuickDrawGX
- public:
- gxShape GetDocShape(void);
- gxJob GetDocJob(void);
- protected:
- void ResetContentClip(void);
- gxJob fDocJob;
- gxShape fPage;
- gxViewPort fContentViewPort;
- #endif // qUseQuickDrawGX
- protected:
- virtual void PageSetupDlg(Boolean theCustomFlag);
- virtual void PrintDlg(Boolean theDialogFlag);
- long fDocPageNum;
- long fPagesInDoc;
- gxFormat fPageFormats[kMaxPageFormats]; // WE SHOULD BE DYNAMIC
- };
-
- #if qUseQuickDrawGX
- extern GXPrintingEventUPP gAppPrintingOverrideUPP;
- #endif // qUseQuickDrawGX
-
- #endif
-